/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package seso;

/**
 *
 * @author Administrator
 */
public class RMiniProgCloseJButton extends javax.swing.JButton {

    private boolean mouse_Entered = false;

    public RMiniProgCloseJButton() {
        super();

        addMouseListener(new java.awt.event.MouseAdapter() {

            @Override
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                mouse_Entered = true;
                mouseEnteredAction();
            }

            @Override
            public void mouseExited(java.awt.event.MouseEvent evt) {
                mouse_Entered = false;
                mouseExitedAction();
            }
        });

    }

    public boolean isMouseEntered() {
        return mouse_Entered;
    }

    private void mouseEnteredAction() {
        ((RMiniProgJPanel) getParent()).mouseEnteredAction();
    }

    private void mouseExitedAction() {
        ((RMiniProgJPanel) getParent()).mouseExitedAction();
    }
}
